package com.gzhryc.common.event;

import java.util.concurrent.ConcurrentHashMap;

public class TriggerServiceFactory {
	
	static TriggerServiceFactory self;
	
	public static TriggerServiceFactory get() {
		if(self == null) {
			self = new TriggerServiceFactory();
		}
		return self;
	}

	ConcurrentHashMap<String,TriggerService> TriggerServiceMap = new ConcurrentHashMap<String,TriggerService>();
	
	public void addTriggerService(String key,TriggerService triggerService) {
		TriggerServiceMap.put(key, triggerService);
	}
	
	public TriggerService getTriggerService(String key) {
		return TriggerServiceMap.get(key);
	}
}
